\section{Life-Cycle Cost Computations}\label{life-cycle-cost-computations}

The objects used for performing a life-cycle cost analysis are:

\begin{itemize}
\item
  LifeCycleCost:Parameters
\item
  LifeCycleCost:RecurringCosts
\item
  LifeCycleCost:NonrecurringCost
\item
  LifeCycleCost:UsePriceEscalation
\item
  LifeCycleCost:UseAdjustment
\end{itemize}

The computation of life-cycle costs is broken into three main routines which are described below.

\subsection{ExpressAsCashFlows}\label{expressascashflows}

\begin{enumerate}
\def\labelenumi{Step~\arabic{enumi}.}
\item If the input file has ComponentCost:* items, then create an additional instance of a nonrecurring cost to hold the total.
\item Get the costs for each resource that has non-zero utility costs.
\item Compute the inflation on a monthly basis. For cases where the inflation approach is constant dollars, the inflation is set to 1.0 for all months. For current dollar analyses, compute the inflation rate on a monthly basis. Just using 1/12 of the annual inflation is almost correct but introduces a small error so instead the inverse of the formula 4-32 from Newnan (Engineering Economic Analysis Ninth Edition by Donald Newnan, Ted Eschenbach, and Jerome Lavelle):
\end{enumerate}

\begin{equation}
Inflation~Per~Month = ((inflation + 1.00) ^ (1.0/12.0)) - 1
\end{equation}

Then the inflation is applied for each month:

\begin{equation}
Monthly~Inflation~Factor(jMonth) = (1 + inflationPerMonth) ^ (jMonth - 1)
\end{equation}

\begin{enumerate}
\def\labelenumi{Step~\arabic{enumi}.}
\setcounter{enumi}{3}
\item Put the nonrecurring, recurring, and utility costs into a monthly array for the entire length of the study period.
\item Multiply the monthly costs by the monthly inflation which was set to 1.0 for constant dollar analyses.
\item Multiply the monthly costs for resources with use adjustments.
\item Sum the monthly costs by category.
\item Based on the base date, accumulate the monthly costs into yearly costs.
\end{enumerate}

\subsection{ComputePresentValue}\label{computepresentvalue}

\begin{enumerate}
\def\labelenumi{Step~\arabic{enumi}.}
\item For each year of the study compute the discount factor (SPV) using the following formula:
\end{enumerate}

\begin{equation}
SPV_{yr} = 1 / ((1 + curDiscountRate) ^ effectiveYear)
\end{equation}

This formula is based on formula D.2.1.1 from NIST Handbook 135 Life Cycle Costing Manual for the Federal Energy Management Program by Sieglinde K. Fuller and Stephen R. Petersen.

Where the effectiveYear depends on the discount convention. If end of year discounting is used than the effectiveYear is the year. If middle of the year discounting is used than the effectiveYear is reduced by 0.5. If the beginning of year discounting is used, than the effectiveYear is reduced by 1.0.

For energy costs, the use price escalations are multiplied by the discount factors.

\begin{enumerate}
\def\labelenumi{Step~\arabic{enumi}.}
\setcounter{enumi}{1}
\item Compute the present value for each month by multiply the monthly costs by the discount factor for each year.
\item Sum the costs by category.
\end{enumerate}

\subsection{ComputeTaxAndDepreciation}\label{computetaxanddepreciation}

\begin{enumerate}
\def\labelenumi{Step~\arabic{enumi}.}
\item Depending on the depreciation method selected the depreciation factors are set to various constants. Depreciation factors are based on IRS Publication 946 for 2009 ``How to Depreciate Property.'' The MACRS values are based on Modified Accelerated Cost Recovery System GDS for 3, 5, 7, 10 year property are based on 200\% depreciation method shown in Appendix A of IRS Publication 946 using half year. 15 and 20 are based on 150\% (Chart 1 of IRS Publication 946). For Straight Line depreciation GDS is used for 27 years (actually 27.5) 31 years (actually 31.5 years) and 39 years using mid month. For 40 years ADS is used (chart 2) Table A-1 is used for 3, 4, 5, 10, 15 and 20 years. Table A-6 is for 27 years. Table A-7 for 31 years. Table A-7a for 39 years. Table A-13 for 40 years. These years are a classification of property and should not be confused with the length of the study. For 27 years, 31 years, 39 years and 40 years the June value was used. All references in this paragraph are to IRS Publication 946.
\item Apply the annual depreciation factors to the capital costs.
\item For each year the taxable income is the grand total of all costs minus the depreciated capital costs.
\item Taxes are the taxable income times the tax rate.
\item The after tax present value is:
\end{enumerate}

\begin{equation}
AfterTaxPresentValue_{yr} = GrandTotal_{yr} - Taxes_{yr} * SPV_{yr}
\end{equation}

All major results are presented on the tabular report.
